package cn.dankal.basiclib.api;

import cn.dankal.annotations.ApiFactory;
import cn.dankal.business.pojo.ActivityBean;
import cn.dankal.business.pojo.ActivityReserveBean;
import cn.dankal.business.pojo.BaseBeanList;
import cn.dankal.business.pojo.HotSearchBean;
import cn.dankal.business.pojo.JoinActivityBean;
import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * Date: 2019/1/01.
 * Time: 17:44
 * classDescription:
 * 活动
 * @author fred
 */

@ApiFactory(value = FgBaseApi.class)
public interface ActivityService {

    /**
     * 车辆活动列表
     *
     * @param search
     * @return
     */
    @GET("vehicle/activity/get/vehicle/activity_list")
    Observable<BaseBeanList<ActivityBean>> activity_list(@Query("search") String search,
                                                         @Query("pageIndex") String pageIndex,
                                                         @Query("pageSize") String pageSize);


    /**
     * 能否预约活动
     * @param activityUuid
     * @return
     */
    @GET("vehicle/activity/is_apply_activity/{activityUuid}")
    Observable<String> is_apply_activity(@Path("activityUuid") String activityUuid);


    /**
     * 外部可查看活动详情
     * @param uuid
     * @return
     */
    @GET("vehicle/activity/get/vehicle/activity_details/{uuid}")
    Observable<ActivityBean> activity_details(@Path("uuid") String uuid);


    /**
     * 详情-报名活动用户信息详情
     * @param uuid
     * @return
     */
    @GET("user/operate/get/user/{uuid}")
    Observable<ActivityReserveBean> activity_reserve_info(@Path("uuid") String uuid);


    /**
     * 查看活动
     * @param activityUuid
     * @return
     */
    @PUT("vehicle/activity/update_look_number/{activityUuid}")
    Observable<String> update_look_number(@Path("activityUuid") String activityUuid);


    /**
     * 预约活动
     * @return
     */
    @POST("vehicle/activity/user_apply_activity")
    Observable<String> user_apply_activity(@Body JoinActivityBean joinActivityBean);


    /**
     * 热门搜索
     * @return
     */
    @GET("vehicle/activity/get/hot_search_list")
    Observable<BaseBeanList<HotSearchBean>> hot_search_list(@Query("pageIndex") String pageIndex,
                                                            @Query("pageSize") String pageSize);

}
